<!DOCTYPE html>
<html>

<head>
  <meta charset="UTF-8" />
  <title>广州市澳凯家具有限公司</title>
  <meta name="keywords" content="家具，设计，广州市澳凯">
  <meta name="description" content="致力於引領辦公家具潮流的廣州市澳凱家具有限公司是一家集專業研發設計，生產製造，銷售與服務於一體的現代企業，工廠座落於享有中國家具之都之稱的廣州市。">
  <meta name='author' content='网站建设：智杰科技'>
  <meta http-equiv="Cache-Control" content="no-transform" />
  <meta name='viewport' content='width=1440' />
  <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
  <link href="./css/build/public.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" href="./css/build/contact.css">
</head>

<body>
  <div class="main pagebox">
    <div class="nav-wrap" id="publicNav"></div>
    <div id="w_common_text-1521105583809" class="reset_style">
      <div>
        <p>
          <span style="color:#000000">
            <span style="font-size:16px">公司地址</span>
          </span>
        </p>
      </div>
    </div>
    <div id="w_img-1521105583798" class="w_img-002">
      <div class="w_img animated  ">
        <div class="e_box e_box-000 p_box">
          <a class="e_link e_link-000 p_link001" target="_blank">
            <div class="e_image e_DImage-001 p_dimage">
              <img src="/img/index2_13.png"  width="100%" height="100%" />
            </div>
          </a>
        </div>
      </div>
    </div>
    <div id="w_common_text-1521105583815" class="reset_style">
      <div>
        <p>
          <span style="font-size:14px">广州市天河区珠江新城华夏路26号雅居乐中心902单元</span>
        </p>
      </div>
    </div>
    <div id="w_img-1521105160892" class="w_img-002">
      <div class="w_img animated  ">
        <div class="e_box e_box-000 p_box">
          <a class="e_link e_link-000 p_link001" target="_blank">
            <div class="e_image e_DImage-001 p_dimage">
              <img src="/img/nybanner.jpg" width="100%" height="100%" />
            </div>
          </a>
        </div>
      </div>
    </div>
    <div id="w_common_text-1521105160902" class="reset_style">
      <div>
        <p style="text-align:center">
          <strong>
            <span style="color:#FFFFFF">
              <span style="font-size:46px">CONTACT</span>
            </span>
          </strong>
        </p>
        <p style="text-align:center">
          <span style="color:#FFFFFF">
            <span style="font-size:36px">
              <strong>联系</strong>
            </span>
          </span>
        </p>
      </div>
    </div>
    <div id="w_common_text-1521105250600" class="reset_style">
      <div>
        <p style="text-align:center">
          <span style="font-size:44px">
            <strong id="companyNameZH"></strong>
          </span>
        </p>
        <p style="text-align:center">
          <span style="font-family:tahoma,geneva,sans-serif">
            <span style="font-size:40px">
              <strong id="companyNameEN"></strong>
            </span>
          </span>
        </p>
      </div>
    </div>
    <div id="w_rbox-1521105637330" class="w_rbox-001">
      <div class="w_rbox">
        <div id="content_box-1521105637330" class="e_rbox e_Rbox-000 p_rbox">
          <div id="w_img-1521105637334" class="w_img-002">
            <div class="w_img animated  ">
              <div class="e_box e_box-000 p_box">
                <a class="e_link e_link-000 p_link001" target="_blank">
                  <div class="e_image e_DImage-001 p_dimage">
                    <img src="/img/index2_13.png"  width="100%" height="100%" />
                  </div>
                </a>
              </div>
            </div>
          </div>
          <div id="w_common_text-1521105637346" class="reset_style">
            <div>
              <p>
                <span style="font-size:14px" id="companyAddr"></span>
              </p>
            </div>
          </div>
          <div id="w_common_text-1521105637341" class="reset_style">
            <div>
              <p>
                <span style="color:#000000">
                  <span style="font-size:16px">公司地址</span>
                </span>
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div id="c_message_form-15211060119480269" class="c_message_form-01001">
      <div class="right-box">
        <div class="form-box">
          <div class="form-item">
            <span class="requir-icon">*</span>
            <textarea class="is-required" id="form_text" maxlength="1000" placeholder="你的疑问和需求(Your questions and needs)"></textarea>
            <div class="error-box">
              <i class="iconfont icon-error"></i>
              <i class="text-error">
                <div class="font">你的疑问和需求不能为空(Can not be empty)！</div>
              </i>
            </div>
          </div>
          <div class="form-item">
            <input type="text" id="form_name" maxlength="32" placeholder="姓名(Name)">
          </div>
          <div class="form-item">
            <input type="text" id="form_phone" maxlength="32" placeholder="手机号(Phone Number)">
            <div class="error-box">
              <i class="iconfont icon-error"></i>
              <i class="text-error">
                <div class="font">您还未输入手机号或输入的号码格式不正确(Incorrect format)！</div>
              </i>
            </div>
          </div>
          <div class="form-item">
            <input type="text" id="form_email" maxlength="32" placeholder="Email">
            <div class="error-box">
              <i class="iconfont icon-error"></i>
              <i class="text-error">
                <div class="font">请输入正确格式的邮箱地址(Incorrect format)！</div>
              </i>
            </div>
          </div>
          <div class="form-item code-item">
            <input class="is-required" type="text" id="form_code" maxlength="32" placeholder="验证码(Code)">
            <div class="error-box">
              <i class="iconfont icon-error"></i>
              <i class="text-error">
                <div class="font">验证码不能为空(Can not be empty)！</div>
              </i>
            </div>
            <div class="error-box code-error-box">
              <i class="iconfont icon-error"></i>
              <i class="text-error">
                <div class="font">输入的验证码不正确(Code error)！</div>
              </i>
            </div>
            <img id="postCodeImg" class="hide" title="点击图片刷新验证码">
          </div>
          <a id="submitForm" class="submit-btn">提交(Submit)</a>
        </div>
      </div>
    </div>
    <div class="toast-box hide">
      <div class="toast-body">反馈成功！</div>
    </div>
    <div id="w_rbox-1521105681076" class="w_rbox-001">
      <div class="w_rbox">
        <div id="content_box-1521105681076" class="e_rbox e_Rbox-000 p_rbox">
          <div id="w_img-1521105681084" class="w_img-002">
            <div class="w_img animated  ">
              <div class="e_box e_box-000 p_box">
                <a class="e_link e_link-000 p_link001" target="_blank">
                  <div class="e_image e_DImage-001 p_dimage">
                    <img src="/img/index2_15.png" width="100%" height="100%" />
                  </div>
                </a>
              </div>
            </div>
          </div>
          <div id="w_common_text-1521105681094" class="reset_style">
            <div>
              <p>
                <span style="color:#000000">
                  <span style="font-size:16px">联系方式</span>
                </span>
              </p>
            </div>
          </div>
          <div id="w_common_text-1521105681101" class="reset_style">
            <div>
              <p>
                <span style="font-size:14px" id="companyTel"></span>
              </p>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div id="c_complaintPage_detail-15211059062702308" class="c_complaintPage_detail-01001">
      <div class="e_box e_box-001 p_complaintPageDetails" loaded="true">
        <article class="e_HtmlEditor e_HtmlEditor-001 p_articles">
          <div class="js-complaintPageContent">
            <div class='reset_style js-reset_style js-adapMobile '>
              <fckedittitle value="百度地图API自定义地图">
                <!--引用百度地图API-->
                <style type="text/css">
                  html,
                  body {
                    margin: 0;
                    padding: 0;
                  }

                  .iw_poi_title {
                    color: #CC5522;
                    font-size: 14px;
                    font-weight: bold;
                    overflow: hidden;
                    padding-right: 13px;
                    white-space: nowrap
                  }

                  .iw_poi_content {
                    font: 12px arial, sans-serif;
                    overflow: visible;
                    padding-top: 4px;
                    white-space: -moz-pre-wrap;
                    word-wrap: break-word
                  }
                </style>
                <script type="text/javascript" src="http://api.map.baidu.com/api?key=&v=1.1&services=true"></script>
                <!--百度地图容器-->
                <div id="dituContent" style="width:1920px;height:400px;border:#ccc solid 0px;"></div>
              </fckedittitle>
            </div>
          </div>
        </article>
      </div>
      <span class="item_hide">
      </span>
    </div>
  </div>
  <div class="footer-wrap" id="publicFooter"></div>
  <script src="js/jquery.min.js"></script>
  <script src="./js/public.js"></script>
  <script>
    //标注点数组
    var markerArr = []
    //创建和初始化地图函数：

    function initMap(marker) {
      markerArr = marker
      createMap();//创建地图
      setMapEvent();//设置地图事件
      addMapControl();//向地图添加控件
      addMarker();//向地图中添加marker
    }

    //创建地图函数：
    function createMap() {
      var map = new BMap.Map("dituContent");//在百度地图容器中创建一个地图
      var point = new BMap.Point(113.328415, 23.131355);//定义一个中心点坐标
      map.centerAndZoom(point, 17);//设定地图的中心点和坐标并将地图显示在地图容器中
      window.map = map;//将map变量存储在全局
    }

    //地图事件设置函数：
    function setMapEvent() {
      map.enableDragging();//启用地图拖拽事件，默认启用(可不写)
      map.enableScrollWheelZoom();//启用地图滚轮放大缩小
      map.enableDoubleClickZoom();//启用鼠标双击放大，默认启用(可不写)
      map.enableKeyboard();//启用键盘上下左右键移动地图
    }

    //地图控件添加函数：
    function addMapControl() {
      //向地图中添加缩放控件
      var ctrl_nav = new BMap.NavigationControl({ anchor: BMAP_ANCHOR_TOP_LEFT, type: BMAP_NAVIGATION_CONTROL_LARGE });
      map.addControl(ctrl_nav);
      //向地图中添加缩略图控件
      var ctrl_ove = new BMap.OverviewMapControl({ anchor: BMAP_ANCHOR_BOTTOM_RIGHT, isOpen: 0 });
      map.addControl(ctrl_ove);
      //向地图中添加比例尺控件
      var ctrl_sca = new BMap.ScaleControl({ anchor: BMAP_ANCHOR_BOTTOM_LEFT });
      map.addControl(ctrl_sca);
    }


    //创建marker
    function addMarker() {
      for (var i = 0; i < markerArr.length; i++) {
        var json = markerArr[i];
        var p0 = json.point.split("|")[0];
        var p1 = json.point.split("|")[1];
        var point = new BMap.Point(p0, p1);
        var iconImg = createIcon(json.icon);
        var marker = new BMap.Marker(point, { icon: iconImg });
        var iw = createInfoWindow(i);
        var label = new BMap.Label(json.title, { "offset": new BMap.Size(json.icon.lb - json.icon.x + 10, -20) });
        marker.setLabel(label);
        map.addOverlay(marker);
        label.setStyle({
          borderColor: "#808080",
          color: "#333",
          cursor: "pointer"
        });
        (function () {
          var index = i;
          var _iw = createInfoWindow(i);
          var _marker = marker;
          _marker.addEventListener("click", function () {
            this.openInfoWindow(_iw);
          });
          _iw.addEventListener("open", function () {
            _marker.getLabel().hide();
          })
          _iw.addEventListener("close", function () {
            _marker.getLabel().show();
          })
          label.addEventListener("click", function () {
            _marker.openInfoWindow(_iw);
          })
          if (!!json.isOpen) {
            label.hide();
            _marker.openInfoWindow(_iw);
          }
        })()
      }
    }
    //创建InfoWindow
    function createInfoWindow(i) {
      var json = markerArr[i];
      var iw = new BMap.InfoWindow("<b class='iw_poi_title' title='" + json.title + "'>" + json.title + "</b><div class='iw_poi_content'>" + json.content + "</div>");
      return iw;
    }
    //创建一个Icon
    function createIcon(json) {
      var icon = new BMap.Icon("http://app.baidu.com/map/images/us_mk_icon.png", new BMap.Size(json.w, json.h), { imageOffset: new BMap.Size(-json.l, -json.t), infoWindowOffset: new BMap.Size(json.lb + 5, 1), offset: new BMap.Size(json.x, json.h) })
      return icon;
    }
  </script>
  <script>
    var postCodeCheck = null;
    function getCompanyInfo () {
      fetchApi({
        type:"GET",
        apiKey:'GET_COMPANY_INFO',
        successCb:function(data){
          var markerArr = [{ 
            title: data.companyName_zh,
            content: `地址：${data.companyAddress}<br/>联系电话：${data.companyTel}`,
            point: `${data.longitude}|${data.latitude}`,
            isOpen: 1,
            icon: { w: 23, h: 25, l: 46, t: 21, x: 9, lb: 12}
          }];
          $("#companyNameZH").html(data.companyName_zh)
          $("#companyNameEN").html(data.companyName_en)
          $("#companyAddr").html(data.companyAddress)
          $("#companyTel").html(data.companyTel)
          initMap(markerArr);//创建和初始化地图
        }
      })
    }
    $(window).ready(function () {
      getCompanyInfo()
      function isNull($this) {
        $this.siblings(".error-box").removeClass("show")
        if ($this.val() === '') {
          $this.siblings(".error-box").eq(0).addClass("show")
          return true
        } else {
          $this.siblings(".error-box").eq(0).removeClass("show")
          return false
        }
      }
      function isPhone($this) {
        var value = $this.val()
        !(/^1[34578]\d{9}$/.test(value))
          ? $this.siblings(".error-box").addClass("show")
          : $this.siblings(".error-box").removeClass("show")
      }
      function isEmail($this) {
        var value = $this.val()
        var reg = new RegExp("^[a-z0-9]+([._\\-]*[a-z0-9])*@([a-z0-9]+[-a-z0-9]*[a-z0-9]+.){1,63}[a-z0-9]+$");
        !reg.test(value)
          ? $this.siblings(".error-box").addClass("show")
          : $this.siblings(".error-box").removeClass("show")
      }
      function isCode () {
        var $this = $("#form_code")
        var value = $this.val()
        if(value == ''){
          $this[0].focus()
          return
        }
        $this.siblings(".error-box").removeClass("show")
        if(!postCodeCheck){
          $this.siblings(".code-error-box").addClass("show")
        }
        value != postCodeCheck
          ? $this.siblings(".code-error-box").addClass("show")
          : $this.siblings(".code-error-box").removeClass("show")
      }
      function getPostCode(){
        $.ajax({
          type: 'GET',
          url: ajaxUrlObj['GET_POST_CODE'],
          success: function(rep){
            if (typeof rep === 'string') {
              rep = JSON.parse(rep)
            }
            if (rep.code == 1){
              rep = JSON.parse(rep.data)
              $("#postCodeImg").attr("src",rep.url).removeClass("hide");
              postCodeCheck = rep.value
            }
          },
          error: function(error){
            console.log(error)
          }
        })
      }
      $(".form-box .is-required").on("blur", function () {
        var $this = $(this)
        isNull($this)
      })
      $("#form_phone").on("change", function () {
        var $this = $(this)
        isPhone($this)
      })
      $("#form_email").on("change", function () {
        var $this = $(this)
        isEmail($this)
      })
      $("#form_code").one("focus",function(){
        getPostCode()
      })
      $("#postCodeImg").on("click",function(){
        getPostCode()
      })
      $("#submitForm").on("click", function () {
        isNull($("#form_text"))
        isNull($("#form_code"))
        isCode()
        var errorNum = $(".error-box.show").length
        if (errorNum > 0) {
          return
        }
        $.ajax({
          type: 'POST',
          url: ajaxUrlObj['POST_MESSAGE'],
          data: {
            content:$("#form_text").val(),
            customerName:$("#form_name").val(),
            tel:$("#form_phone").val(),
            email:$("#form_email").val(),
          },
          success: function(rep){
            if (typeof rep === 'string') {
              rep = JSON.parse(rep)
            }
            $(".toast-box .toast-body").html(rep.code == 1?'反馈成功':'反馈失败')
            if (rep.code != 1) {
              $(".toast-box").addClass("error-toast")
            }
            $(".toast-box").removeClass("hide");
            setTimeout(function(){
              $(".toast-box").addClass("hide").removeClass("error-toast");
              window.location.reload()
            }, 1500);
          },
          error: function(error){
            console.log(error)
          }
        });
      })
    })
  </script>
</body>

</html>